<template>
	<div class="app">
		<h4>{{address}}，{{school}}，{{subject}}</h4>
		<h4>{{$store.getters.miniAddress}}，{{$store.getters.upSchool}}，{{subject}}</h4>
		<!-- <button @click="demo">测试一下mapState有啥用</button> -->
		<Count/>
	</div>
</template>

<script>
	import Count from './components/Count.vue'
	import {mapState} from 'vuex'

	export default {
		name:'App',
		components:{Count},
		/* methods: {
			demo(){
				const result = mapState({address:'address',school:'school',subject:'subject'})
				console.log(result)
			}
		}, */
		computed:{
			...mapState(['address','school','subject']) //数组写法
		}
	}
</script>

<style>
	.app{
		background-color: gray;
		padding: 20px;
	}
</style>